<template>
  <div class="UserUpdateForm">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="姓名">
        <el-input v-model="inf.customer.name"></el-input>
      </el-form-item>
      <el-form-item label="手机号">
        <el-input v-model="inf.customer.phone"></el-input>
      </el-form-item>
      <el-form-item style="dispaly: flex">
        <el-button type="primary" @click="onSubmit">修改</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "UserUpdateForm",
  props: ["inf"],
  data() {
    return {
      
    };
  },
  
  methods: {
    onSubmit() {
      //   let _this = this;
      this.$axios({
        url: "/customer/updateCustomer",
        method: "post",
        data: this.inf,
      }).then(function (resp) {
        if(resp.data==1){
            alert("修改成功")
            location.reload();
        }else{
            alert("修改失败")
        }
      });
    },
  },
};
</script>